package com.thunder.kocho.loki.shape;

import android.animation.Animator;
import android.animation.ArgbEvaluator;
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.animation.ValueAnimator;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Rect;
import android.view.animation.AccelerateDecelerateInterpolator;

import com.thunder.kocho.loki.Loki;
import com.thunder.kocho.loki.LokiGroup;
import com.thunder.kocho.loki.ShapeLoki;
import com.thunder.kocho.loki.shape.CircleLoki;

import java.util.ArrayList;

public class DiamondLoki extends ShapeLoki {

    private Path mPath=null;

    public DiamondLoki(){}

    @Override
    protected void drawShape(Canvas canvas, Paint paint) {
        if(getLokiBounds()!=null&&mPath!=null){
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(Color.parseColor("#FF68BC08"));
            canvas.drawPath(mPath,paint);
        }
    }

    public void initPath(){
        if(getLokiBounds()==null){
            return;
        }
        mPath=new Path();
        int x=getLokiBounds().left;
        int y=getLokiBounds().top;
        int width=getLokiBounds().width();
        int height=getLokiBounds().height();
        mPath.moveTo(x+width/2f,y);
        mPath.lineTo(x+width,y+height/2f);
        mPath.lineTo(x+width/2f,y+height);
        mPath.lineTo(x,y+height/2f);
        mPath.lineTo(x+width/2f,y);
        mPath.close();
    }

    @Override
    protected void reset() {
        resetAll();
    }

    @Override
    protected Animator onCreateAnimator() {
        return null;
    }

}
